/**
*      author: Y_Yao
*      created: 2024-11-16 19:40:00
**/

#include<bits/stdc++.h>

using namespace std;
#define int LL
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin >> n;
    unordered_map<int,int> hash;
    while(n)
    {
        int t = n % 10;
        n = n / 10;
        hash[t]++;
    }

    if(hash[1] == 1 && hash[2] == 2 && hash[3] == 3)
    {
        cout << "Yes" << endl;
    }
    else cout << "No" << endl;
    return 0;
}